/**
 *
 */
package com.zhuoyue.elmt.service;

import java.util.List;

import com.zhuoyue.elmt.entity.DeviceParameters;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eit.eitsite.common.persistence.Page;
import com.eit.eitsite.common.service.CrudService;
import com.zhuoyue.elmt.entity.GgSbjc;
import com.zhuoyue.elmt.dao.GgSbjcDao;

/**
 * 设备信息Service
 *
 * @version 2016-12-18
 */
@Service
@Transactional(readOnly = true)
public class GgSbjcService extends CrudService<GgSbjcDao, GgSbjc> {

    public GgSbjc get(String id) {
        return super.get(id);
    }

    public int updateNearMainDate(GgSbjc ggSbjc) {
        return dao.updateNearMainDate(ggSbjc);
    }

    @Transactional(readOnly = false)
    public int updateSbLocation(GgSbjc ggSbjc) {
        return dao.updateSbLocation(ggSbjc);
    }

    public GgSbjc getBySbzcdm(GgSbjc ggSbjc) {
        return dao.getBySbzcdm(ggSbjc);
    }

    public List<GgSbjc> findList(GgSbjc ggSbjc) {
        return super.findList(ggSbjc);
    }

    public Page<GgSbjc> findPage(Page<GgSbjc> page, GgSbjc ggSbjc) {
        return super.findPage(page, ggSbjc);
    }

    @Transactional(readOnly = false)
    public void save(GgSbjc ggSbjc) {
        super.save(ggSbjc);
    }

    @Transactional(readOnly = false)
    public void delete(GgSbjc ggSbjc) {
        super.delete(ggSbjc);
    }

    @Transactional(readOnly = false)
    public void update(GgSbjc ggSbjc) {
        super.update(ggSbjc);
    }

    @Transactional(readOnly = false)
    public int modifyGgsbjcParameter(DeviceParameters deviceParameters) {
        deviceParameters.preUpdate();
        return dao.modifyGgsbjcParameter(deviceParameters);
    }

    @Transactional(readOnly = false)
    public int newElevatorParameters(DeviceParameters deviceParameters) {
        deviceParameters.preInsert();
        return dao.newElevatorParameters(deviceParameters);
    }

    @Transactional(readOnly = false)
    public int deleteGgSbjc(String tzsbbh) {
        return dao.deleteGgSbjc(tzsbbh);
    }
}